﻿using SportsStore.InMemoryRepository.Interfaces;
using SportsStore.Model;
using System.Collections.Generic;
using System.Linq;
using SportsStore.ServicesInterfaces;
using SportsStore.ServicesInterfaces.Interfaces;

namespace SportsStore.InMemoryService
{
  public class ProductService : IProductService
  {
    readonly IProductRepository _repository;

    public ProductService(IProductRepository repository)
    {
      _repository = repository;
    }

    public IEnumerable<Product> GetProducts(int pageNumber, int pageItems)
    {
      return _repository.Entities.ToList();
    }
  }
}
